<?php
require_once 'lvmao_func.php';


//用户发布问题扣除积分
function AddQuestion($num)
{
	$uid=GetId();
	
	//调用通用积分操作函数
	AddScoreLog($uid,$num,21,0,0,"");
}


//用户问题追加积分
function AddScore($num)
{
	$uid=GetId();
	
	//调用通用积分操作函数
	AddScoreLog($uid,$num,2,0,0,"");
}


function DelQuestion($num)
{
	$uid=GetId();
	
	//调用通用积分操作函数
	AddScoreLog($uid,$num,2,0,0,"");
}




//用户回复问题增加积分
function AddReply($num)
{
	$uid=GetId();
	
	//调用通用积分操作函数
	AddScoreLog($uid,$num,3,0,0,"");
}


//用户回复被删除
function DelReply($num)
{
	$uid=GetId();
	
	//调用通用积分操作函数
	AddScoreLog($uid,$num,3,0,0,"");
}

//选中最佳答案奖励
function AcceptAnswer($num,$userid)
{
	global $db;
	$sql="select a.id from user a inner join zzinfo_member b on a.username=b.username and b.userid=".$userid;
	$re=$db->query($sql);
	$re=$db->fetch_array($re);
	
	$uid=$re[id];
	
	AddScoreLog($uid,$num,31,0,0,"");
}



?>